package com.mayikt.zuul.handler.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console;
import com.mayikt.zuul.handler.BaseHandler;
import com.mayikt.zuul.handler.GatewayHandler;
import com.netflix.zuul.context.RequestContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletResponse;

@Service
@Slf4j
public class ApiAuthorityHandler extends BaseHandler implements GatewayHandler {
    @Override
    public void service(RequestContext rc, String ipAddress, HttpServletResponse response) {
        Console.log(">>>>>>流程2：接口验签");
        if (!BeanUtil.isEmpty(this.nextGatewayHandler)){
            this.nextGatewayHandler.service(rc,ipAddress,response);
        }
    }
}
